{% macro gen_table(enterprise_projects) %}
    <table id="cancel-attention-user-info-table"
           class="table table-bordered table-hover table-condensed table-striped">
            <thead>
                <tr>
                    <th>排序</th>
                    <th>项目类型</th>
                    <th>项目造价</th>
                    <th>项目标题</th>
                    <th>项目内容</th>
                    <th>项目图片</th>
                    <th>操作</th>
                </tr>
            </thead>
            {% for each in enterprise_projects %}
            <tbody>
                <tr>
                    <td>{{ each.weight }}</td>
                    <td>{{ each.project_type_display }}</td>
                    <td>{{ each.project_cost }}</td>
                    <td>{{ each.project_title }}</td>
                    <td>{{ each.project_text }}</td>
                    <td>
                        <img src="{{ each.project_img_url }}" width="100px" height="100px">
                    </td>
                    <td>
                         <a
                        class="btn btn-xs btn-primary"
                        href="{{ url_for('enterprise_bp.enterprise_item_edit', item_key='project', item_id=each.id) }}"
                        target="_self"
                    >编辑</a><br>
                    <a
                        class="btn btn-xs btn-danger" style="margin: 3px;"
                        href="{{ url_for('enterprise_bp.enterprise_item_delete', item_key='project', item_id=each.id) }}"
                        target="_self"
                        onclick="return confirm('确定要删除此产品吗?')"
                    >删除</a><br>
                    </td>
                </tr>
            </tbody>
            {% endfor %}
        </table>
{% endmacro %}
